import { EntityId, PageQueryParams } from 'kf-web-library';
import {User} from "@/services";

export interface AbtLink{
  nameCn: string;
  nameEn?: string;
  descriptionCn?: string;
  descriptionEn?: string;
  url: string;

  primary?: boolean;
  inx?: number;
}

export interface AbtText{
  textCn: string;
  textEn?: string;
}


export interface NotifyRemindPageQueryParams extends Partial<PageQueryParams> {
  ids?: EntityId[];
  status?: string; //状态, UNREAD: 1未阅读, READ:9已阅读
  senderId?: EntityId;
  recipientId?: EntityId;
  action?: string;
  objectId?: string;
  objectType?: string;
  createTime?: string[];
}
export interface NotifyRemind{
  id: EntityId; //id
  senderId: EntityId; //发送人id
  sender: User; //发送人id
  action: string; //通知行为/类型，如：异步任务启动/结束、流程任务到达等
  recipientId: EntityId; //接收人id
  recipient: User; //接收人id
  message: string; //消息内容
  objectId: string; //目标对象id
  objectType: string; //目标对象类型
  status: string; //状态, UNREAD: 1未阅读, READ:9已阅读
  readTime: string; //阅读时间
  channels: string; //通知渠道,多个逗号分隔(短信,微信,安卓,IOS,webscoket等)
  createTime: string; //创建时间
  modifyTime: string; //修改时间
  deleted: number; //删除标记, 0是未删除,其他值是已删除
  extras: any;
}

export interface NotifyAnnouncePageQueryParams extends Partial<PageQueryParams> {
  ids?: EntityId[];
  status?: string; //状态, UNREAD: 1未阅读, READ:9已阅读
  senderId?: EntityId;
  recipientId?: EntityId;
  action?: string;
  objectId?: string;
  objectType?: string;
  createTime?: string[];
}

export interface NotifyAnnounce{
  id: EntityId; //id
  senderId: EntityId; //发送人,通常是系统管理员
  sender: User; //发送人id
  title: string; //公告标题
  content: string; //公告内容
  read: boolean; //是否已读
  createTime: string; //创建时间
  modifyTime: string; //修改时间
  deleted: number; //删除标记, 0是未删除,其他值是已删除
}


